package com.htfyun.eink.pw.draw.pen.epd.charcoal;

import java.util.Arrays;

public class BitmapData {
    public final int width;
    public final int height;
    public int[][] data;

    public BitmapData(int width) {
        this.width = width;
        this.height = width;

        data = new int[this.width][this.height];

    }

    public static BitmapData copy(BitmapData bitmapData) {
        BitmapData copyBitmapData = new BitmapData(bitmapData.width);
        for (int i = 0; i < bitmapData.data.length; i++) {
            copyBitmapData.data[i] = Arrays.copyOf(bitmapData.data[i], bitmapData.data[i].length);
        }
        return copyBitmapData;
    }

}
